{extend name="public/base"/}
{block name="body"}
<title>后台管理系统</title>
<meta name="keywords" content="微信分销,小程序开发,电商app,定制网站,网站建设,网站设计,微信公众号">
<meta name="description" content="湖北思洋专注于诚接各种中大型互联网项目,如微信分销,小程序开发,电商app，定制网站,网站建设,网站设计,微信公众号,微信二次开发,专业制作团队以及售后服务为您的项目保驾护航。">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
		<input type="hidden" class="input-text" value="1" id="id" name="id">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">账号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$user.username}" placeholder="账号" id="username" name="username">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>密码：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="密码" id="password" name="password">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/public/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/public/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/public/static/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#form-admin-add").validate({
		rules:{
			password:{
				required:true,
				minlength:4,
			}
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit({
				type: 'post',
				url: "{:url('editpassword')}",
				success: function(data){
					if(data.code==200){
						layer.msg('已修改!',{icon:1,time:2000});
						setTimeout("parent.location.reload()",2000);
					}else{
						layer.msg('失败！',{icon:2,time:3000});
					}

				},
                error: function(XmlHttpRequest, textStatus, errorThrown){
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);
				}
			});
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->

{/block}